package com.example.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author <a href="juntao.zhang@bkjk.com">juntao.zhang</a>
 * @Description:
 * @Package com.example.config.controller
 * @date 2017/12/13 15:24
 * @see
 */
@RestController
public class TestController {

    @Value("${zhang.age:24}")
    private Integer name;

    public Integer getName() {
        return name;
    }

    @Value("${zhang.age:24}")
    public void setName(Integer name) {
        this.name = name;
    }

    @GetMapping("/name")
    public void main(String[] args) {
        System.out.println(name);
    }

}
